<div class="box white_bg">
<? if(!$this->viewParams['gallery']) :?>
<?=t(6110) ?>
<?else:?>
<link href="http://<?=SITE_URL?>/public/library/jquery/uploadify/uploadify.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="http://<?=SITE_URL?>/public/library/jquery/uploadify/swfobject.js"></script>
<script type="text/javascript" src="http://<?=SITE_URL?>/public/library/jquery/uploadify/jquery.uploadify.js"></script>

<script type="text/javascript">
$(document).ready(function() {
	
	$("#fileInput").uploadify({
		'uploader'       : 'http://<?=SITE_URL?>/public/library/jquery/uploadify/uploadify.swf',
		'script'         : "<?=$this->hvnUrl( array('module' => 'gallery', 'action' => 'process-uploaded-file', 'controller' => "ajax"), 'generic')?>",
		'cancelImg'      : 'http://<?=SITE_URL?>/public/library/jquery/uploadify/cancel.png',
		'folder'         : <?=$this->viewParams['gallery']['id'] ?>, 
		'multi'          : true,
		'onAllComplete' 	 : function(){
						alert("Photos uploaded");
						window.location.href =  "<?=$_SERVER['REQUEST_URI']?>";
						window.location.reload();
		} 
	});
//
//	var update_gallery_thumbs = function()
//	{
//		
//	}
});
 //$(window).unload(function() {alert('unloading')});
</script>

	<div style="margin-left:50px;margin-top:30px">
		<img src="<?=str_replace("/original/", "/xxsmall/",$this->viewParams['gallery']['thumb']);?>"
		/>
		<b><?=t(6111) ?> :</b> 
		<i><?=$this->viewParams['gallery']['title'] ?> </i> 
		<b><?=t(14) ?> :</b>  <?=$this->viewParams['gallery']['category'] ?>, <b>Gallery id:</b> #<?=$this->viewParams['gallery']['id'] ?>
		<br/>
		<b><?=t(136) ?> :</b> <a href="<?=$this->hvnUrl(array("module"=>"user",
						"controller" => "account", "action" => "view"
				), 'generic')?>?id=<?=$this->viewParams['gallery']['poster_id'] ?>">
		<?=$this->viewParams['gallery']['metadata']['poster_name'] ?></a>
		<br/><br/>
		<hr/>
		<?=t(6113) ?> <b><?=t(6112) ?></b> <?=t(6114) ?><br/><br/>
		<input id="fileInput" name="fileInput" type="file" />
		<br/>
		<a href="javascript:$('#fileInput').uploadifyUpload();"><?=t(6115) ?></a>
		| <a href="javascript:$('#fileInput').uploadifyClearQueue();"><?=t(6116) ?></a>
	</div>
<?endif?>	
</div>	